import {get, post, del, put} from '../utils/request'

//添加商品到购物车
export function addCartItem(data) {
    return post('/oms/add/cart/item', data)
}

//获取购物车列表
export function getCart() {
    return get('/oms/list')
}

//批量删除购物车商品
export function deleteCartItem(ids) {
    return post('/oms/delete', ids)
}

//修改商品数量
export function modifyCart(id, quantity) {
    return post('/oms/update/quantity?id=' + id+'&quantity=' + quantity)
}

//获取购物车列表中指定id的商品
export function getByCartItemIds(params) {
    return get('/oms/list/byids', params)
}
